package org.hwua.production.domain.authority;

/**
 * 角色有权限操作的系统功能项
 * @author hwua
 *
 */
public class SysRolePermission implements java.io.Serializable {
	private static final long serialVersionUID = 1L;
    private String id;//编号

    private String sysRoleId;//角色编号

    private String sysPermissionId;//系统功能编号

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id == null ? null : id.trim();
    }

    public String getSysRoleId() {
        return sysRoleId;
    }

    public void setSysRoleId(String sysRoleId) {
        this.sysRoleId = sysRoleId == null ? null : sysRoleId.trim();
    }

    public String getSysPermissionId() {
        return sysPermissionId;
    }

    public void setSysPermissionId(String sysPermissionId) {
        this.sysPermissionId = sysPermissionId == null ? null : sysPermissionId.trim();
    }

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		result = prime * result + ((sysPermissionId == null) ? 0 : sysPermissionId.hashCode());
		result = prime * result + ((sysRoleId == null) ? 0 : sysRoleId.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		SysRolePermission other = (SysRolePermission) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		if (sysPermissionId == null) {
			if (other.sysPermissionId != null)
				return false;
		} else if (!sysPermissionId.equals(other.sysPermissionId))
			return false;
		if (sysRoleId == null) {
			if (other.sysRoleId != null)
				return false;
		} else if (!sysRoleId.equals(other.sysRoleId))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "SysRolePermission [id=" + id + ", sysRoleId=" + sysRoleId + ", sysPermissionId=" + sysPermissionId
				+ "]";
	}
    
}